﻿using Abp.Application.Services.Dto;
using System;
using System.Collections.Generic;
using System.Text;

namespace Camc.Quality.BomMake.Dto
{
    public class BomMakeTreeGridDto
    {
        public BomMakeEditParentData data { get; set; } = new BomMakeEditParentData();
        public List<BomMakeDetaillist> children { get; set; } = new List<BomMakeDetaillist>();
    }
    public class BomMakeEditParentData : EntityDto<Guid>
    {
        /// <summary>
        /// id
        /// </summary>
        public Guid Id { get; set; }
        /// <summary>
        /// 节点名称
        /// </summary>
        public string NodeName { get; set; }
        /// <summary>
        /// 图号
        /// </summary>
        public string NodeDrawingNo { get; set; }
        /// <summary>
        /// 是否关联
        /// </summary>
        public int IsRelation { get; set; }
        /// <summary>
        /// 父ID
        /// </summary>
        public Guid ParentId { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        public int NodeLevel { get; set; }
        /// <summary>
        /// 父节点Code
        /// </summary>
        public string ParentCode { get; set; }
        /// <summary>
        /// 节点Code
        /// </summary>
        public string NodeCode { get; set; }
        /// <summary>
        /// 是否叶节点
        /// </summary>
        public int IsLeaf { get; set; }
        /// <summary>
        /// 是否导出
        /// </summary>
        public int IsExport { get; set; }
        /// <summary>
        /// 配套状况描述
        /// </summary>
        public string AssortStatusDesc { get; set; }
        /// <summary>
        /// 出库状态描述
        /// </summary>
        public string OutboundStatusDesc { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        public string LevelRelationship { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        public int LevelNum { get; set; }
        #region 补充
        /// <summary>
        /// 物料细分类别名称
        /// </summary>
        public string MaterialCategoryName { get; set; }
        /// <summary>
        /// 物料属性
        /// </summary>
        public string MaterialProperty { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }
        /// <summary>
        /// 物料图号
        /// </summary>
        public string MaterialNo { get; set; }
        /// <summary>
        /// 物料标识
        /// </summary>
        public string MaterialTypeCode { get; set; }
        /// <summary>
        /// 规格型号
        /// </summary>
        public string Model { get; set; }
        /// <summary>
        /// 物料类别
        /// </summary>
        public Guid MaterialsNodeId { get; set; }
        /// <summary>
        /// 物料类别名称
        /// </summary>
        public string MaterialsTypeName { get; set; }
        /// <summary>
        /// 主单位
        /// </summary>
        public Guid UnitId { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 单位1BOM用量=单位净用量/(1-损耗率）
        /// </summary>
        public int Unit1BomDosage { get; set; }
        /// <summary>
        /// 配套数量（无）
        /// </summary>
        public int SuiteStock { get; set; }
        /// <summary>
        /// 可用预配套数量
        /// </summary>
        public int UsableQuantityStock { get; set; }
        /// <summary>
        /// 缺料数量（无）
        /// </summary>
        public int StarvingStock { get; set; }
        /// <summary>
        /// 出库数量 (芯级汇总)
        /// </summary>
        public int DeliveryStockAll { get; set; }
        /// <summary>
        /// 预配套人
        /// </summary>
        public string PreSuiteName { get; set; }
        /// <summary>
        /// 预配套时间
        /// </summary>
        public DateTime PreSuiteTime { get; set; }
        /// <summary>
        /// 配套人
        /// </summary>
        public string CompletePeople { get; set; }
        /// <summary>
        /// 配套时间
        /// </summary>
        public DateTime CompleteTime { get; set; }
        #endregion
        #region 给模态文本添加字段
        /// <summary>
        /// 型号
        /// </summary>
        public string Module { get; set; }
        /// <summary>
        /// 发次
        /// </summary>
        public string SendTime { get; set; }
        /// <summary>
        /// 芯及名称
        /// </summary>
        public string XjName { get; set; }
        /// <summary>
        /// 部套名称
        /// </summary>
        public string BTName { get; set; }
        /// <summary>
        /// 规程图号
        /// </summary>
        public string GCName { get; set; }
        #endregion
    }
    public class BomMakeEditChildData : EntityDto<Guid>
    {
        /// <summary>
        /// id
        /// </summary>
        public Guid Id { get; set; }
        /// <summary>
        /// 节点名称
        /// </summary>
        public string NodeName { get; set; }
        /// <summary>
        /// 图号
        /// </summary>
        public string NodeDrawingNo { get; set; }
        /// <summary>
        /// 是否关联
        /// </summary>
        public int IsRelation { get; set; }
        /// <summary>
        /// 父ID
        /// </summary>
        public Guid ParentId { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        public int NodeLevel { get; set; }
        /// <summary>
        /// 层级名称
        /// </summary>
        public string LevelName { get; set; }
        /// <summary>
        /// 层级(导出用)
        /// </summary>
        public int LevelNum { get; set; } = 0;
        /// <summary>
        /// 物料层级
        /// </summary>
        public string MaterialLevel { get; set; }
        /// <summary>
        /// 父节点Code
        /// </summary>
        public string ParentCode { get; set; }
        /// <summary>
        /// 节点Code
        /// </summary>
        public string NodeCode { get; set; }
        /// <summary>
        /// 是否叶节点
        /// </summary>
        public int IsLeaf { get; set; }
        /// <summary>
        /// 是否导出
        /// </summary>
        public int IsExport { get; set; }
        /// <summary>
        /// 配套状况描述
        /// </summary>
        public string AssortStatusDesc { get; set; }
        /// <summary>
        /// 出库状态描述
        /// </summary>
        public string OutboundStatusDesc { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int Number { get; set; } = 1;
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 代号
        /// </summary>
        public string Code { get; set; }
        #region 补充
        /// <summary>
        /// 物料属性
        /// </summary>
        public string MaterialProperty { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }
        /// <summary>
        /// 物料图号
        /// </summary>
        public string MaterialNo { get; set; }
        /// <summary>
        /// 物料标识
        /// </summary>
        public string MaterialTypeCode { get; set; }
        /// <summary>
        /// 物料类别
        /// </summary>
        public Guid MaterialsNodeId { get; set; }
        /// <summary>
        /// 物料类别名称
        /// </summary>
        public string MaterialsTypeName { get; set; }
        /// <summary>
        /// 物料细分类别名称
        /// </summary>
        public string MaterialCategoryName { get; set; }
        /// <summary>
        /// 主单位
        /// </summary>
        public Guid UnitId { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 物料型号
        /// </summary>
        public string Module { get; set; }
        /// <summary>
        /// 单位1BOM用量=单位净用量/(1-损耗率）
        /// </summary>
        public int Unit1BomDosage { get; set; }
        /// <summary>
        /// 配套数量（无）
        /// </summary>
        public int SuiteStock { get; set; }
        /// <summary>
        /// 可用预配套数量
        /// </summary>
        public int UsableQuantityStock { get; set; }
        /// <summary>
        /// 缺料数量（无）
        /// </summary>
        public int StarvingStock { get; set; }
        /// <summary>
        /// 出库数量 (芯级汇总)
        /// </summary>
        public int DeliveryStockAll { get; set; }
        /// <summary>
        /// 预配套人
        /// </summary>
        public string PreSuiteName { get; set; }
        /// <summary>
        /// 预配套时间
        /// </summary>
        public DateTime? PreSuiteTime { get; set; }
        /// <summary>
        /// 配套人
        /// </summary>
        public string CompletePeople { get; set; }
        /// <summary>
        /// 配套时间
        /// </summary>
        public DateTime? CompleteTime { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        public string LevelRelationship { get; set; }
        #endregion
        #region 给模态文本添加字段
        /// <summary>
        /// 型号
        /// </summary>
        public string ModuleHJ { get; set; }
        /// <summary>
        /// 发次
        /// </summary>
        public string SendTime { get; set; }
        /// <summary>
        /// 芯及名称
        /// </summary>
        public string XjName { get; set; }
        /// <summary>
        /// 部套名称
        /// </summary>
        public string BTName { get; set; }
        /// <summary>
        /// 规程图号
        /// </summary>
        public string GCName { get; set; }

        /// <summary>
        /// 年代号
        /// </summary>
        public string YearsNo { get; set; }
        #endregion
    }
    public class BomMakeDetaillist
    {
        public BomMakeEditChildData data { get; set; } = new BomMakeEditChildData();
        public List<BomMakeDetaillist> children { get; set; } = new List<BomMakeDetaillist>();
    }
}
